package com.common.www.bean.entity.auth;

import org.springframework.boot.base.jpa.domain.entity.NumberIdentityEntity;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;

import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

/**
 * 相同的用户在不同的小区有各自的钱包，钱包余额不通用
 */
@DynamicUpdate(false)
@DynamicInsert(false)
@Getter
@Setter
@Entity
@NoArgsConstructor
@AllArgsConstructor
@Table()
public class AuthUserFollow extends NumberIdentityEntity {
    private static final long serialVersionUID = -6590337746774534820L;

    /**
     * 作者
     */
    @JsonIgnoreProperties(value = {"authRoles"})
    @ManyToOne()
    @JoinColumn()
    private AuthUser fromUser;
    /**
     * 作者
     */
    @JsonIgnoreProperties(value = {"authRoles"})
    @ManyToOne()
    @JoinColumn()
    private AuthUser toUser;


}
